#!/bin/bash

CURRENT_USER=$1
if  [ ! -n "${CURRENT_USER}" ] ;then
    echo "Delete sudo failed, you need input username parameter!"
    exit 1
fi

CONFIG_FILE="/etc/sudoers.d/${CURRENT_USER}_specific_for_ADKInstaller"
if [ -f "${CONFIG_FILE}" ] ;then
    rm ${CONFIG_FILE}
    echo "delete sudo right for ${CURRENT_USER}"
    exit 0
fi

echo "didn't find ${CONFIG_FILE}, no need del sudo right for ${CURRENT_USER}"

